package pl.wr.physics.units.planck.base;

import pl.wr.math.number.Fraction;
import pl.wr.physics.units.AbstractUnit;
import pl.wr.physics.units.SI.Prefix;
import pl.wr.physics.units.SI.base.m;
import pl.wr.physics.units.planck.PlanckSIValues;

/**
 * Planck length - Planck units
 * 
 * @version 1.0
 * @author wieslaw.rodak
 * 
 */
public final class L extends AbstractUnit implements PlanckSIValues {

	/**
	 * Field symbol. (value is ""l(p)"")
	 */
	public static final String symbol = "l(p)";

	/**
	 * planck length - L
	 * 
	 * @param value
	 *            in <code>int</code>
	 */
	public L(int value) {
		this(Prefix.basic, value);
	}

	/**
	 * planck length - L
	 * 
	 * @param value
	 *            in <code>float</code>
	 */
	public L(float value) {
		this(Prefix.basic, value);
	}

	/**
	 * planck length - L
	 * 
	 * @param value
	 *            in <code>Fraction</code>
	 */
	public L(Fraction value) {
		this(Prefix.basic, value);
	}

	/**
	 * planck length - L
	 * 
	 * @param p
	 *            - prefix SI
	 * @param value
	 *            - value in <code>int</code>
	 */
	public L(Prefix p, int value) {
		super(p, value, L.class.getSimpleName());
	}

	/**
	 * planck length - L
	 * 
	 * @param p
	 *            - prefix SI
	 * @param value
	 *            - value in <code>float</code>
	 */
	public L(Prefix p, float value) {
		super(p, value, L.class.getSimpleName());
	}

	/**
	 * planck length - L
	 * 
	 * @param p
	 *            - prefix SI
	 * @param value
	 *            - value in <code>Fraction</code>
	 */
	public L(Prefix p, Fraction value) {
		super(p, value, L.class.getSimpleName());
	}

	/**
	 * This value multiply {@link pl.wr.physics.units.planck.PlanckSIValues#LENGTH}.
	 */
	@Override
	public m getSIValue() {
		return new m(Fraction.multiply(this.getValue(), PlanckSIValues.LENGTH.getValue()));
	}
}
